Added parentage functions#59
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates package exports/imports to support new pedigree/parentage-related functionality, including exposing validate_pedigree() and tightening check_ped() dependency declarations.
Changes:
- Export
validate_pedigree()and add itsdata.tableroxygen imports. - Replace broad
@importdirectives incheck_ped()with more specific@importFromentries. - Regenerate/update
NAMESPACEaccordingly (including addingtools::file_path_sans_extandjanitor::clean_namesimports).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| R/validate_pedigree.R | Adds @importFrom data.table ... for validate_pedigree() and ensures it’s exported. |
| R/check_ped.R | Switches roxygen imports to @importFrom for dplyr/janitor and adds tools::file_path_sans_ext. |
| NAMESPACE | Updates exports/imports to match roxygen (adds export(validate_pedigree), switches janitor import style, adds additional dplyr imports). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #59 +/- ##
===============================================
- Coverage 81.53% 78.96% -2.58%
===============================================
Files 23 23
Lines 2616 2814 +198
===============================================
+ Hits 2133 2222 +89
- Misses 483 592 +109 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ement for documentation on check_ped
…and to plot results.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
man/validate_pedigree.Rd:90
- The function always writes
corrected_pedigree.txtto the working directory (even whenwrite_results = FALSE), but this side-effect isn’t documented here. Please document this output file (including when it’s written and how it relates towrite_results) so users aren’t surprised by unexpected files in their working directory.
\description{
Validates parent-offspring trios by calculating Mendelian error rates from
SNP genotype data. Identifies incorrect parentage assignments and suggests
best-matching replacements. If a list of founders is supplied, trios that
are declared founders (both parents coded as 0) are preserved unchanged
with no recommendations. Trios removed due to missing genotype data are
retained in the output with a NO_GENOTYPE_DATA status.
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
NAMESPACE:33
NAMESPACEno longer importsjanitor, and a repo-wide search shows no remainingjanitor::usage. However,DESCRIPTIONstill listsjanitorunderImports, which will typically trigger an R CMD check NOTE about unused imports. Either removejanitorfromDESCRIPTIONor reintroduce an actual use/import as appropriate.
import(dplyr)
import(parallel)
import(quadprog)
import(stringr)
import(tibble)
import(tidyr)
import(vcfR)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 19 changed files in this pull request and generated 7 comments.
Files not reviewed (6)
- man/allele_freq_poly.Rd: Language not supported
- man/check_ped.Rd: Language not supported
- man/find_parentage.Rd: Language not supported
- man/imputation_concordance.Rd: Language not supported
- man/solve_composition_poly.Rd: Language not supported
- man/validate_pedigree.Rd: Language not supported
Comments suppressed due to low confidence (1)
DESCRIPTION:66
janitorremains listed under Imports, but there are no longer anyjanitor::(orclean_names) usages in the R sources. This makesjanitoran unnecessary hard dependency; consider removing it from DESCRIPTION Imports if it's truly unused.
Imports:
parallel,
dplyr,
Rdpack (>= 0.7),
readr (>= 2.1.5),
reshape2 (>= 1.4.4),
rlang,
tidyr (>= 1.3.1),
vcfR (>= 1.15.0),
Rsamtools,
Biostrings,
pwalign,
janitor,
quadprog,
tibble,
stringr,
data.table
Suggests:
… or file paths, updated documentation and test files
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 20 changed files in this pull request and generated 4 comments.
Files not reviewed (6)
- man/allele_freq_poly.Rd: Language not supported
- man/check_ped.Rd: Language not supported
- man/find_parentage.Rd: Language not supported
- man/imputation_concordance.Rd: Language not supported
- man/solve_composition_poly.Rd: Language not supported
- man/validate_pedigree.Rd: Language not supported
| importFrom(ggplot2,aes) | ||
| importFrom(ggplot2,element_text) | ||
| importFrom(ggplot2,geom_bar) | ||
| importFrom(ggplot2,ggplot) | ||
| importFrom(ggplot2,labs) | ||
| importFrom(ggplot2,theme) | ||
| importFrom(ggplot2,theme_minimal) |
| } | ||
|
|
||
| missing_parents <- distinct(missing_parents) | ||
| missing_parents <- dplyr::distinct(missing_parents) |
| id = progeny_ids, | ||
| male_parent = NA_character_, | ||
| female_parent = NA_character_, | ||
| mendelian_error_pct = NA_character_, |
| ggplot2::geom_vline(xintercept = error_threshold, | ||
| linetype = "dashed", color = "black", linewidth = 1) + | ||
| ggplot2::scale_x_continuous(breaks = seq(0, 100, by = 5)) + | ||
| ggplot2::scale_y_continuous(breaks = seq(0, 10000, by = 5)) + |
Added 2 parentage functions along with test files for them. updated imporFrom statemetns for ped_check